Constraint-based grammar